The Info

https://bookdown.org/yihui/rmarkdown-cookbook/html-tabs.html

Packages I’m going to use

library(rmarkdown)
library(DT)
library(ggplot2)
library(plotly)
library(blscrapeR)
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ tibble  3.0.4     ✓ dplyr   1.0.2
## ✓ tidyr   1.1.2     ✓ stringr 1.4.0
## ✓ readr   1.4.0     ✓ forcats 0.5.0
## ✓ purrr   0.3.4
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks plotly::filter(), stats::filter()
## x dplyr::lag()    masks stats::lag()
df <- bls_api(c("CES2000000001", "CES7000000001","CES5500000001","CES6500000001"),
                startyear = 2000, endyear = 2020)  %>%
    dateCast() %>%
  select(date, seriesID, value) %>%
  mutate(seriesID = case_when(seriesID == "CES2000000001" ~ "Construction",
                              seriesID == "CES7000000001" ~ "Hospitality",
                              seriesID == "CES5500000001" ~ "Financial",
                              seriesID == "CES6500000001" ~ "Educ./Health Services"))
## REQUEST_SUCCEEDED

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

Interactive Table

Interactive Plot

You can also embed plots, for example:

## Warning: `group_by_()` is deprecated as of dplyr 0.7.0.
## Please use `group_by()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.